<!--
 * @Author: yushuang
 * @Date: 2024-12-16 10:20:05
 * @LastEditors: yushuang
 * @LastEditTime: 2024-12-20 16:21:50
 * @Description: 
-->
<script setup lang="ts">
import { computed } from 'vue';
import { useLayoutState } from '../../basic-layout/context';

const { logo, title, layout, isMobile } = useLayoutState();
const cls = computed(() => ({
  'ant-pro-global-header-logo': layout.value === 'mix' || isMobile.value,
  'ant-pro-top-nav-header-logo': layout.value === 'top' && !isMobile.value
}));
</script>

<template>
  <div :class="cls">
    <a class="text-primary">
      <img :src="logo" />
      <h1 v-if="!isMobile">{{ title }}</h1>
    </a>
  </div>
</template>
